<template>
    <div class="body1">
        <div class="no-print el-button-print">
            <el-button @click="addForm">添加页</el-button>
            <el-button @click="deleteForm">删除页</el-button>
            <el-button @click="exportPDF">导出为pdf</el-button>
        </div>
        <div class="body2" id="pdfDom" :class="{ 'pdf-export': isPdfExport }">
            <div class="title">
                <div class="biaotididian">{{ agencyName }}</div>
                <div class="biaoti">陈述申辩笔录</div>
            </div>
            <div class="tableStyle1">
                <!-- 主体-->
                <div class="writ-height">
                    <span>案&nbsp&nbsp由：</span>
                    <input v-model="form.param_1" :resize="'none'" autosize maxlength="28" class="inputStyle1"
                        style="width: calc(28 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height">
                    <span>当事人：</span>
                    <div style="display: inline-block; position: relative;">
                        <privy-info-select-return-array v-model="form.unitName" v-model:isSelected="form.isUnit"
                            :isTable="false" return-fields="A(B)" :return-array-template="[
                                { name: 'legalPerson', field: 'C' },
                                { name: 'legalPersonPosition', field: '法定代表人' },
                                { name: 'legalPersonPhone', field: 'H' },
                            ]" :rowConfig="unitNameConfig" @select="selectUnitUpdateData">
                        </privy-info-select-return-array>
                    </div>
                </div>
                <div class="writ-height">
                    <span>陈述申辩人：姓名</span>
                    <input v-model="form.legalPerson" :resize="'none'" autosize maxlength="8" class="inputStyle1"
                        style="width: calc(8 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                    <span>性别</span>
                    <input v-model="form.param_4" :resize="'none'" autosize maxlength="2" class="inputStyle1"
                        style="width: calc(2 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                    <span>联系电话</span>
                    <input v-model="form.legalPersonPhone" :resize="'none'" autosize maxlength="16" class="inputStyle1"
                        oninput="this.value = this.value.replace(/[^a-zA-Z0-9_-]/g, '')"
                        style="width: calc(8 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height">
                    <span>身份证号：</span>
                    <input v-model="form.param_6" :resize="'none'" autosize maxlength="20" class="inputStyle1"
                        oninput="this.value = this.value.replace(/[^a-zA-Z0-9_-]/g, '')"
                        style="width: calc(10 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                    <span>与当事人关系：</span>
                    <input v-model="form.legalPersonPosition" :resize="'none'" autosize maxlength="10"
                        class="inputStyle1" style="width: calc(10 * 5mm);font-family: 仿宋;font-size: 5mm;"
                        type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height">
                    <span>陈述申辩地点：</span>
                    <input v-model="form.param_8" :resize="'none'" autosize maxlength="25" class="inputStyle1"
                        style="width: calc(25 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height">
                    <span>陈述申辩时间：</span>
                    <span>
                        <editable-textarea :text="form.date1" param-type="YYYYMMDD1"
                            @send-to-parent="receiveFromChild"></editable-textarea>
                        <editable-textarea :text="form.time1" param-type="HH:mm1"
                            @send-to-parent="receiveFromChild"></editable-textarea>至<editable-textarea
                            :text="form.time2" param-type="HH:mm2"
                            @send-to-parent="receiveFromChild"></editable-textarea>
                    </span>
                </div>
                <div class="writ-height" style="margin-bottom: 1px">
                    <span>行政执法人员：</span>
                    <InvestigatorSelect class="InvestigatorSelectReplace"
                        style="height: 6mm; width: calc(10 * 5mm);margin-bottom: 4px;border-bottom: 1px solid black"
                        v-model="form.dangShiRen1" :id-field="'dangShiRenId1'" @change="handleInvestigatorChange" />
                    <span>执法证件号：</span>
                    <input v-model="form.dangShiRenId1" :resize="'none'" autosize class="inputStyle1" readonly
                        style="width: calc(9 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height" style="margin-bottom: 1px">
                    <span>&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp&nbsp</span>
                    <InvestigatorSelect class="InvestigatorSelectReplace"
                        style=" height: 6mm;width: calc(10 * 5mm);margin-bottom: 4px;border-bottom: 1px solid black"
                        v-model="form.dangShiRen2" :id-field="'dangShiRenId2'" @change="handleInvestigatorChange" />
                    <span>执法证件号：</span>
                    <input v-model="form.dangShiRenId2" :resize="'none'" autosize class="inputStyle1" readonly
                        style="width: calc(9 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="writ-height" style="margin-bottom: 1px">
                    <span>记录人：</span>
                    <InvestigatorSelect class="InvestigatorSelectReplace"
                        style="height: 6mm;width: calc(13 * 5mm);margin-bottom: 4px;border-bottom: 1px solid black"
                        v-model="form.dangShiRen3" :id-field="'dangShiRenId3'" @change="handleInvestigatorChange" />
                    <span>执法证件号：</span>
                    <input v-model="form.dangShiRenId3" :resize="'none'" autosize class="inputStyle1" readonly
                        style="width: calc(9 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div style="height: 395px; line-height: 30px;">
                    陈述申辩内容：<CrossRowInput v-model:value="form.v1" :line-config="v1Config"></CrossRowInput>
                </div>
                <div style="height: 130px; position: relative;">
                    <div
                        style="position: absolute; bottom: 90px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end;">
                        <div style="display: flex; align-items: flex-end;">
                            陈述申辩人签名：
                            <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                <SignatureField label="签名1" sign-type="sign1" :img-url="form.img1"
                                    @update:imgUrl="form.img1 = $event" />
                            </span>
                        </div>
                        <div>
                            <editable-textarea :text="form.date2" param-type="YYYYMMDD2"
                                @send-to-parent="receiveFromChild"></editable-textarea>
                        </div>
                    </div>
                    <div
                        style="position: absolute; bottom: 50px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; ">
                        <div style="display: flex; align-items: flex-end;">
                            行政执法人员签名：
                            <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                <SignatureField label="签名2" sign-type="sign2" :img-url="form.img2"
                                    @update:imgUrl="form.img2 = $event" />
                            </span>
                            ，
                            <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                <SignatureField label="签名3" sign-type="sign3" :img-url="form.img3"
                                    @update:imgUrl="form.img3 = $event" />
                            </span>
                        </div>
                        <div>
                            <editable-textarea :text="form.date3" param-type="YYYYMMDD3"
                                @send-to-parent="receiveFromChild"></editable-textarea>
                        </div>
                    </div>
                    <div
                        style="position: absolute; bottom: 10px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; ">
                        <div style="display: flex; align-items: flex-end;">
                            记录人签名：
                            <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                <SignatureField label="签名4" sign-type="sign4" :img-url="form.img4"
                                    @update:imgUrl="form.img4 = $event" />
                            </span>
                        </div>
                        <div>
                            <editable-textarea :text="form.date4" param-type="YYYYMMDD4"
                                @send-to-parent="receiveFromChild"></editable-textarea>
                        </div>
                    </div>
                </div>
                <div class="writ-height">
                    <span>备注：</span>
                    <input v-model="form.param_10" :resize="'none'" autosize maxlength="29" class="inputStyle2"
                        style="width: calc(29 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea" ref="inputRef6">
                </div>
                <div class="page-number-div">
                    第1页/共{{ form.continuationSheet.length + 1 }}页
                </div>
            </div>
            <div v-for="(item, index) in form.continuationSheet" :key="index" class="page-break">
                <div class="title">
                    <div class="biaotididian">陈述申辩笔录</div>
                </div>
                <div class="tableStyle1">
                    <!-- 黑色条 -->
                    <div style="background: #000;width: 162mm; height: 5px;"></div>
                    <div style="height: 702px; width: 162mm;">
                        <el-input type="textarea" v-model="item.v2" :rows="v2Config[index].maxLines"
                            @keydown.native="continuationSheetHandleKeyDown('v2-' + index, $event)"
                            @input="continuationSheetHandleInput('v2-' + index, $event)"
                            @paste.native="continuationSheetHandlePaste('v2-' + index, $event)"
                            class="el-textarea-hidden"
                            style=" height: 100%;white-space: pre;overflow-x: auto;font-family: monospace;"
                            wrap="soft" />
                        <!-- <CrossRowInput v-model:value="item.v2" :line-config="v2Config[index]"></CrossRowInput> -->

                    </div>
                    <div style="height: 130px; position: relative;">
                        <div
                            style="position: absolute; bottom: 90px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end;">
                            <div style="display: flex; align-items: flex-end;">
                                陈述申辩人签名：
                                <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                    <SignatureField label="签名1" sign-type="sign1" :img-url="item.img1"
                                        @update:imgUrl="item.img1 = $event" />
                                </span>
                            </div>
                            <div>
                                <editable-textarea :text="item.date2" param-type="YYYYMMDD2"
                                    @send-to-parent="(data, type) => receiveFromChildInFor(data, type, index)"></editable-textarea>
                            </div>
                        </div>
                        <div
                            style="position: absolute; bottom: 50px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; ">
                            <div style="display: flex; align-items: flex-end;">
                                行政执法人员签名：
                                <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                    <SignatureField label="签名2" sign-type="sign2" :img-url="item.img2"
                                        @update:imgUrl="item.img2 = $event" />
                                </span>
                                ，
                                <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                    <SignatureField label="签名3" sign-type="sign3" :img-url="item.img3"
                                        @update:imgUrl="item.img3 = $event" />
                                </span>
                            </div>
                            <div>
                                <editable-textarea :text="item.date3" param-type="YYYYMMDD3"
                                    @send-to-parent="(data, type) => receiveFromChildInFor(data, type, index)"></editable-textarea>
                            </div>
                        </div>
                        <div
                            style="position: absolute; bottom: 10px; left: 0px; right: 20px; display: flex; justify-content: space-between; align-items: flex-end; ">
                            <div style="display: flex; align-items: flex-end;">
                                记录人签名：
                                <span style="border-bottom: 1px solid black; padding-bottom: 6px;">
                                    <SignatureField label="签名4" sign-type="sign4" :img-url="item.img4"
                                        @update:imgUrl="item.img4 = $event" />
                                </span>
                            </div>
                            <div>
                                <editable-textarea :text="item.date4" param-type="YYYYMMDD4"
                                    @send-to-parent="(data, type) => receiveFromChildInFor(data, type, index)"></editable-textarea>
                            </div>
                        </div>
                    </div>
                    <div class="writ-height">
                        <span>备注：</span>
                        <input v-model="item.param_2" :resize="'none'" autosize maxlength="29" class="inputStyle2"
                            style="width: calc(29 * 5mm);font-family: 仿宋;font-size: 5mm;" type="textarea"
                            ref="inputRef6">
                    </div>
                    <div class="page-number-div">
                        第{{ index + 2 }}页/共{{ form.continuationSheet.length + 1 }}页
                    </div>
                </div>
            </div>
        </div>
    </div>
</template>

<script>
import EditableTextarea from "@/views/template/EditableTextarea";
import { agencyName, sealName } from "../../utils/publicName.js"
import PrivyInfoSelectReturnArray from "@/views/template/PrivyInfoSelectReturnArray";
import InvestigatorSelect from "@/views/template/InvestigatorSelect";
import SignatureField from "@/views/template/SignatureField";
import { createInputLimiter } from '@/utils/limitInput';
import CrossRowInput from '@/views/template/CrossRowInput';

export default {
    name: "202309784304",
    components: {
        EditableTextarea,
        InvestigatorSelect,
        SignatureField,
        CrossRowInput,
        PrivyInfoSelectReturnArray,
    },

    data() {
        return {
            agencyName: agencyName,
            sealName: sealName,
            form: {
                continuationSheet: [],
            },
            isPdfExport: false, //控制打印样式
            v1Config: {
                firstLine: { chars: 25 * 2 },
                middleLines: { count: 11, chars: 32 * 2 },
                lastLine: { chars: 32 * 2 }
            },
            v2Config: [],
            unitNameConfig: {
                firstLine: { chars: 28 * 2 },
                middleLines: { count: 0, chars: 32 * 2 },
                lastLine: { chars: 0 * 2 }
            }
        }

    },
    created() {
        window.parent.getTemplateData((data) => {
            this.form = data;
            for (let i = 0; i < this.form.continuationSheet.length; i++) {
                this.v2Config.push({
                    maxLines: 23,
                    charsPerLine: 32 * 2,
                    maxLength: 23 * 32 * 2,
                    inputLimiter: null,
                    displayText: ''
                })
                this.v2Config[i].inputLimiter = createInputLimiter(this, {
                    maxLines: this.v2Config[i].maxLines,
                    charsPerLine: this.v2Config[i].charsPerLine,
                    maxLength: this.v2Config[i].maxLength,
                    propName: `form.continuationSheet[${i}].v2`
                });
                // this.v2Config.push({
                //     firstLine: { chars: 32 * 2 },
                //     middleLines: { count: 21, chars: 32 * 2 },
                //     lastLine: { chars: 32 * 2 }
                // })
            }
        })
        window.postForm = () => {
            this.postForm();
        }
    },
    mounted() {
        window.parent.changeTemplateDow();

    },

    methods: {
        addForm() {
            this.form.continuationSheet.push({});
            this.v2Config.push({
                maxLines: 23,
                charsPerLine: 32 * 2,
                maxLength: 23 * 32 * 2,
                inputLimiter: null,
                displayText: ''
            })
            this.v2Config[this.v2Config.length - 1].inputLimiter = createInputLimiter(this, {
                maxLines: this.v2Config[this.v2Config.length - 1].maxLines,
                charsPerLine: this.v2Config[this.v2Config.length - 1].charsPerLine,
                maxLength: this.v2Config[this.v2Config.length - 1].maxLength,
                propName: `form.continuationSheet[${this.v2Config.length - 1}].v2`
            });
            // this.v2Config.push({
            //     firstLine: { chars: 32 * 2 },
            //     middleLines: { count: 21, chars: 32 * 2 },
            //     lastLine: { chars: 32 * 2 }
            // })
        },
        // 删除页
        deleteForm() {
            if (this.form.continuationSheet.length > 0) {
                this.form.continuationSheet.pop();
                this.v2Config.pop();
            } else {
                // 使用Element UI的提示（确保已引入ElMessage）
                this.$message.warning('至少保留一页');
            }
        },
        continuationSheetGetConfigName(field) {
            // 将field按-拆分
            const parts = field.split('-');
            const index = parts[1];
            switch (field) {
                case 'v2-' + index:
                    return this.v2Config[index];
            }
        },
        continuationSheetHandleKeyDown(field, e) {
            const config = this.continuationSheetGetConfigName(field);
            config.inputLimiter.handleKeyDown(e);
        },
        continuationSheetHandleInput(field, value) {
            const config = this.continuationSheetGetConfigName(field);
            const parts = field.split('-');
            const field1 = parts[0]
            const index = parts[1];

            // form数组的第index个中的filed1属性
            this.form.continuationSheet[index][field1] = config.inputLimiter.handleInput(value);
        },
        continuationSheetHandlePaste(field, e) {
            const config = this.continuationSheetGetConfigName(field);
            config.inputLimiter.handlePaste(e);
        },
        // 导出为pdf
        exportPDF() {
            this.savePDF()
                .then((blob) => {
                    const blobUrl = URL.createObjectURL(blob);

                    // 先预览
                    const previewWindow = window.open(blobUrl, '_blank');

                    // 自动下载
                    const fileName = `陈述申辩笔录.pdf`;
                    const downloadLink = document.createElement('a');
                    downloadLink.href = blobUrl;
                    downloadLink.download = fileName;
                    document.body.appendChild(downloadLink);
                    downloadLink.click();
                    document.body.removeChild(downloadLink);

                    // 监听预览窗口关闭后释放内存
                    if (previewWindow) {
                        const timer = setInterval(() => {
                            if (previewWindow.closed) {
                                clearInterval(timer);
                                URL.revokeObjectURL(blobUrl);
                            }
                        }, 1000);
                    } else {
                        setTimeout(() => URL.revokeObjectURL(blobUrl), 10000); // 兜底释放
                    }
                })
                .catch(error => {
                    console.error('导出PDF出错:', error);
                    alert('导出失败，请重试或联系管理员');
                });
        },
        savePDF() {
            this.isPdfExport = true; // 激活PDF样式
            return new Promise((resolve, reject) => {
                this.$nextTick(() => {
                    import('html2pdf.js').then((module) => {
                        const html2pdf = module.default;

                        //获取所有需要替换的 el-input
                        const elInputs = document.querySelectorAll('.el-textarea-hidden .el-input__inner, .el-textarea-hidden .el-textarea__inner');

                        //存储原始元素和它们的父节点，方便后续恢复
                        const originalElements = [];

                        elInputs.forEach((input) => {
                            const div = document.createElement('div');
                            div.style.whiteSpace = 'pre-wrap'; // 保留换行
                            div.style.fontFamily = '仿宋';
                            div.style.fontSize = '19px';
                            div.style.height = '100%';
                            div.style.width = '100%';

                            div.textContent = input.value; // 保留原内容（自动处理 \n 换行）
                            // div.style.lineHeight = 1.3;
                            div.style.lineHeight = '30px';
                            div.style.backgroundImage = 'linear-gradient(to top, #000 1px, transparent 1px)';
                            div.style.backgroundSize = '100% 30px';
                            div.style.backgroundRepeat = 'repeat-y';
                            div.style.backgroundPosition = '0 -3px';
                            div.style.padding = '0';
                            div.style.boxSizing = 'border-box';


                            // 替换 el-input，并存储原始元素
                            originalElements.push({
                                parent: input.parentNode,
                                original: input,
                                replacement: div,
                            });
                            input.parentNode.replaceChild(div, input);
                        });
                        // 处理执法人替换（el-select用的也是.el-input__inner）
                        const InvestigatorSelectSelects = document.querySelectorAll('.InvestigatorSelectReplace .el-input__inner, .InvestigatorSelectReplace .el-textarea__inner');
                        InvestigatorSelectSelects.forEach((input) => {
                            const div = document.createElement('div');
                            div.style.whiteSpace = 'pre-wrap'; // 保留换行
                            div.style.fontFamily = '仿宋';
                            div.style.fontSize = '19px';
                            div.style.height = '100%';
                            div.style.width = '100%';
                            div.textContent = input.value; // 保留原内容（自动处理 \n 换行）
                            div.style.lineHeight = 1.3;
                            div.style.textAlign = 'center';

                            originalElements.push({
                                parent: input.parentNode,
                                original: input,
                                replacement: div,
                            });
                            input.parentNode.replaceChild(div, input);
                        });
                        // 配置选项
                        const opt = {
                            margin: 0,
                            image: {
                                type: 'jpeg',
                                quality: 0.98
                            },
                            html2canvas: {
                                scale: 2,
                                logging: false,
                                useCORS: true
                            },
                            jsPDF: {
                                unit: 'mm',
                                format: 'a4',
                                orientation: 'portrait'
                            }
                        };

                        const element = document.getElementById('pdfDom');

                        // 生成PDF Blob对象
                        html2pdf()
                            .set(opt)
                            .from(element)
                            .toPdf()
                            .get('pdf')
                            .then((pdf) => {
                                const blob = pdf.output('blob');

                                resolve(blob); // 返回Blob对象
                            })
                            .catch((error) => {
                                reject(error);
                            })
                            .finally(() => {
                                this.isPdfExport = false; // 恢复原始样式
                                // 恢复原始input
                                originalElements.forEach(({ parent, original, replacement }) => {
                                    parent.replaceChild(original, replacement);
                                });
                            });
                    }).catch((error) => {
                        reject(error);
                        this.isPdfExport = false;
                        originalElements.forEach(({ parent, original, replacement }) => {
                            parent.replaceChild(original, replacement);
                        });
                    });
                });
            });
        },
        //父页面提交按钮将调用此方法，此方法将文书数据回传到父页面的请求方法中
        postForm() {
            this.savePDF()
                .then((blob) => {


                    // 创建FormData并添加文件
                    const formData = new FormData();
                    formData.append('file', blob, '陈述申辩笔录.pdf');

                    window.parent.postTemplateDate(this.form, formData);
                })
                .catch(error => {
                    console.error('整个保存PDF出错:', error);
                });
        },
        //选择日期时间
        receiveFromChild(data, type) {
            const TypeMap = {
                'YYYYMMDD1': 'date1',
                'YYYYMMDD2': 'date2',
                'YYYYMMDD3': 'date3',
                'YYYYMMDD4': 'date4',
                'YYYYMMDD5': 'date5',
                'HH:mm1': 'time1',
                'HH:mm2': 'time2'
            };
            if (TypeMap[type]) {
                this.form[TypeMap[type]] = data;
            }
        },
        // 处理For循环中的时间
        receiveFromChildInFor(data, type, index) {
            const TypeMap = {
                'YYYYMMDD2': 'date2',
                'YYYYMMDD3': 'date3',
                'YYYYMMDD4': 'date4',
                'YYYYMMDD5': 'date5',
            };
            if (TypeMap[type] && this.form.continuationSheet[index]) {
                this.form.continuationSheet[index][TypeMap[type]] = data;
            }
        },
        //选择执法人员
        handleInvestigatorChange({ identificationNumber, idField }) {
            if (idField && identificationNumber) {
                this.form[idField] = identificationNumber;
            }
        },
        // 选择单位
        selectUnitUpdateData(data) {
            data.forEach(item => {
                this.form[item.name] = item.value;
            })
        },
    }
}
</script>

<style scoped>
:deep(.el-button-print .el-button) {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    width: auto;
    min-width: 100px;
    height: auto;
    padding: 8px 15px;
    background: #fff !important;
    color: #000 !important;
    border: none;
}

:deep(.el-textarea__inner) {
    box-shadow: 0 0 0 0;
    color: black;
    padding: 0;
    font-family: "仿宋", serif;
    font-size: 5mm;
    overflow-y: hidden;
    line-height: 1.6;

    /* 下划线 */
    border-radius: 0px;
    background-image: linear-gradient(to top, #000000 0.5px, transparent 1px);
    background-size: 100% 1.6em;
    background-position: 0 -3px;
}

:deep(.el-textarea-hidden .el-textarea__inner) {
    box-shadow: 0 0 0 0;
    color: black;
    padding: 0;
    font-family: "仿宋", serif;
    font-size: 5mm;
    overflow-y: hidden !important;
    resize: none !important;
    height: auto !important;
}

:deep(.el-select .el-input__inner) {
    text-align: center;
    height: 5mm;
}

.input-container {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
}

.inputStyleNoLine {
    border: none;
    outline: none;
    padding: 0px;
}

.typeSpan {
    cursor: pointer;
    font-size: 5mm;
}
</style>
